{% extends 'common/basic_list.html' %}
{% load toolbox_tags %}
{% load table_tags %}
{% block list_title %}
    计划任务
{% endblock %}

{% block subtitle %}
    <small>
        计划任务会依照定义的周期定期进行调度，你可以定义
        <a href="/frontend/celery_manager/crontab_schedule_list/">周期</a>和
        <a href="/frontend/celery_manager/interval_schedule_list/">Crontab</a>格式的周期与计划任务关联
    </small>
{% endblock %}

{% block list_filter %}
    <div class="col-sm-4">
        <div class="input-group">
            {% toolbox_add 'preriodic_task_add/' %}
            &nbsp;
            {% toolbox_batch_delete %}
        </div>
    </div>
{% endblock %}

{% block list_content %}
    <table class="table table-striped table-bordered table-hover dataTables-example dataTable">
        {% table_head "任务名称@name,任务@task,周期@interval,Crontab@crontab,过期时间@expires,状态@enabled" order_by ordering 'width:15%' %}
        <tbody>
        {% for o in result_list %}
            {% table o.id 'preriodic_task_edit/' o.id o.name o.task o.interval o.crontab o.expires o.enabled|bool_to_human %}
        {% endfor %}
        </tbody>
    </table>
{% endblock %}